package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_discover_comment_reply;

//DAO
public interface U_discover_comment_replyMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_DISCOVER_COMMENT_REPLY  WHERE ID = #{id}")
	public ApiU_discover_comment_reply findU_discover_comment_replyById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_discover_comment_reply")
	public List<ApiU_discover_comment_reply> findU_discover_comment_replys();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_discover_comment_replysByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_DISCOVER_COMMENT_REPLY (COMMENT_ID, CONTENT, USER_ID, USER_NAME, REPLY_ID, REPLY_USER_ID, REPLY_USER_NAME, CREATE_TIME, IS_EFFECT, IS_DELETE) VALUES (#{comment_id}, #{content}, #{user_id}, #{user_name}, #{reply_id}, #{reply_user_id}, #{reply_user_name}, #{create_time}, #{is_effect}, #{is_delete})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_discover_comment_reply(ApiU_discover_comment_reply u_discover_comment_reply);

	// 修改
	@Update("UPDATE U_DISCOVER_COMMENT_REPLY SET COMMENT_ID = #{comment_id}, CONTENT = #{content}, USER_ID = #{user_id}, USER_NAME = #{user_name}, REPLY_ID = #{reply_id}, REPLY_USER_ID = #{reply_user_id}, REPLY_USER_NAME = #{reply_user_name}, CREATE_TIME = #{create_time}, IS_EFFECT = #{is_effect}, IS_DELETE = #{is_delete} WHERE ID = #{id}")
	public int updateU_discover_comment_reply(ApiU_discover_comment_reply u_discover_comment_reply);

	// 删除
	@Delete("DELETE FROM U_DISCOVER_COMMENT_REPLY  WHERE ID = #{id}")
	public int deleteU_discover_comment_reply(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
